/**
 * @name util.Uri
 * @class
 */
san.def("util.Uri",function(san){
	
	//http://www.example.com:80/index.php?mod=foo&action=foo
	//var reg=/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([0-9.\-A-Za-z]+)+)?(?:\?([&=\w]+))?$/;
	var paramsToObject=function(uri){
		
		var results=uri.match(/[^\?&](\w+=\w+)/g);
		var obj={};
		for(var i=0,len=results.length;i<len;i++){
			var pair=results[i].split("=");
			obj[pair[0]]=pair[i];	
		}
		return obj;
	}
	//Test Case
	//var s="http://www.example.com:80/index.php?mod=foo&action=foo";
	//paramsToObject(s);
	
	
	//EXPOSE
	return {
		"paramsToObject": paramsToObject
		
	}
	
});
